<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="javascript:;">卡片列表</a></li>
		</ul>
        <form class="well form-search" method="post" action="{:U('AdminCard/index')}">
			物流公司:
			<select name="s_logistics_id">
				<option value="">请选择物流公司</option>
				<foreach name="logistics_sub_list" item="litem">
					<option value="{$litem['id']}" <if condition="$s_logistics_id == $litem['id']">selected</if>>{$litem.logistics_name}</option>
				</foreach>
			</select>
            会员卡号：
            <input type="text" name="s_card_number" style="width: 200px;" value="{$s_card_number}" placeholder="请输入会员卡号">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:U('AdminCard/index')}">清空</a>
        </form>
		<form class="js-ajax-form" action="" method="post">

			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>
                        <th width="50">卡号</th>
                        <th width="50">会员姓名</th>
						<th width="50">会员手机号	</th>
                        <th width="50">绑定车牌号	</th>
                        <th width="50">状态</th>
                        <th width="50">所属机构		</th>
                        <th width="50">可用余额	</th>
                        <th width="50">总积分	</th>
						<th width="50">可用积分	</th>
						<th width="50">卡费	</th>
						<th width="50">末次消费时间	</th>
						<th width="50">状态	</th>
						<th width="70">{:L('ACTIONS')}</th>
					</tr>
				</thead>
				<foreach name="list" item="vo">
				<tr>
                    <td><b>{$vo.number}</b></td>
                    <td>{$vo.vip_name}</td>
					<td>{$vo.vip_phone}</td>
					<td>{$vo.vip_plate_number}</td>
					<td><if condition="$vo['is_active'] == 1">已激活<else/>未激活</if></td>
					<td>{$vo.logistics_name}</td>
					<td>{$vo.balance}</td>
					<td>{$vo.point}</td>
					<td>{$vo.use_point}</td>
					<td>{$vo.active_price}</td>
					<td><if condition="!empty($vo['last_sale_time'])">{:date("Y-m-d H:i:s",$vo['last_sale_time'])}</if></td>
					<td>
						<if condition="$vo['status'] == 1">
							正常
							<else/>
							已注销
						</if>
					</td>
					<td>
						<a href="{:U('AdminCard/refund',array('id'=>$vo['id']))}">退款</a>
						<if condition="$vo['status'] == 1">
							<a href="{:U('Admin/AdminCard/status',array('id'=>$vo['id'],'status'=>2))}" >注销</a>
							<else/>
							<a href="{:U('Admin/AdminCard/status',array('id'=>$vo['id'],'status'=>1))}" >解冻</a>
						</if>
					</td>
				</tr>
				</foreach>

			</table>

			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
	<script>
		function refersh_window() {
			var refersh_time = getCookie('refersh_time');
			if (refersh_time == 1) {
				window.location = "{:U('AdminCard/index',$formget)}";
			}
		}

	</script>
</body>
</html>